
<?php include('includes/header.php'); ?>
<?php include('includes/nav.php'); ?>

<script language="javascript" type="text/javascript" src="java/datetimepicker.js">
</script>

<div id="content">

<?php
//=========================================================================================================================================
function validateThisForm()
{
   global $errmsg;

   $errmsg = '';

   if (strlen($_POST["fromdate"] == 0) && strlen($_POST["todate"] == 0))
   {
      $errmsg = "No date selected...";
      return (FALSE);
   }

   if (strlen($_POST["fromdate"] == 0) && strlen($_POST["todate"] > 0))
   {
      $errmsg = "Date error...";
      return (FALSE);
   }

   if (strlen($_POST["fromdate"] > 0) && strlen($_POST["todate"] == 0))
   {
      $errmsg = "Date error...";
      return (FALSE);
   }

   if (strlen($_POST["fromdate"] > 0) && strlen($_POST["todate"] > 0))
   {
      $fromdate = convertDatePicker($_POST["fromdate"],"YYYYMMDD");
      $fromdatebin = strtotime($fromdate);

      $todate = convertDatePicker($_POST["todate"],"YYYYMMDD");
      $todatebin = strtotime($todate);

      if ($fromdatebin > $todatebin)
      {
         $errmsg = "Date error...";
         return (FALSE);
      }
   }
    return (TRUE);
}
//=========================================================================================================================================
?>
</div> <!-- end #content -->
<?php include('includes/sidebar.php'); ?>
<?php include('includes/footer.php'); ?>
